<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://unpkg.com/vue/dist/vue.js"></script>
</head>
<body>
    <div id="test">
        <!--使用v-on:绑定事件，v-on:可以简写为@-->
        <div v-on:click="alertFun">点我</div>
        <div @click="alertfunction">dfajd</div>
    </div>
</body>
<script type="text/javascript">
    var vm=new Vue({
        el:'#test',
        methods:{
            alertFun:function(){
                alert("你太帅了");
            },
            alertfunction:function(){
                alert(11111);
            }
        }
    });
</script>
</html>